package Test_1026;

import java.util.Scanner;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-10-26
 * Time: 21:17
 */
public class test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        int index=str.lastIndexOf(" ");
        int len=str.substring(index+1).length();
    }
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        String[] s=str.split(" ");
        int len=s[s.length-1].length();
        System.out.println(len);
    }

    //大写转小写
        public String toLowerCase(String s) {
            StringBuilder stringBuilder=new StringBuilder();
            for (int i = 0; i < s.length(); i++) {
                char ch=s.charAt(i);
                if(Character.isAlphabetic(ch)){
                    if(Character.isUpperCase(ch)){
                        ch=(char)(ch+32);
                    }
                }
                stringBuilder.append(ch);
            }
            return stringBuilder.toString();
        }
        //单词个数
    public int countSegments(String s) {
         int len=s.length();
        if(len==0){
            return 0;
        }
        int count=0;
        String[] m=s.split(" ");
        for(String i:m){
            if(i.length()!=0){
                count++;
            }
        }
        return count;
    }
    //第一个唯一的字符串位置"leetcode"
    public int firstUniqChar(String s) {
        int len = s.length();
        int[] count = new int[26];
        for (int i = 0; i < len; i++) {
            char m = s.charAt(i);
            count[m - 'a']++;
        }
        for (int i = 0; i < len; i++) {
            char m = s.charAt(i);
            if (count[m - 'a'] == 1) {
                return i;
            }
        }
        return -1;
    }

}
